package heroes;

import java.util.ArrayList;

import javax.swing.JButton;

public abstract class Skill {
	enum Stage{beforePandin, playReadyState};
	Stage triggerStage;
	
	private String name;
	private String description;
//not used in this version of game
	private int manaCost;
	public boolean chosen;
	boolean activeSkill;
	public boolean isActiveSkill(){
		return activeSkill;
	}
	//only used for active skill
	boolean enabled;
	JButton skillButton;
	public void link(JButton toBlinked){
		skillButton = toBlinked;
	}
	public boolean isEnabled(){
		return enabled;
	}
	public void enable(){
		enabled = true;
		skillButton.setEnabled(true);
	}
	public void disable(){
		enabled = false;
		skillButton.setEnabled(false);
	}
	
	public Skill(String n, String d, boolean active){
		name = n;
		description = d;
		manaCost = 0;
		activeSkill = active;
	}
	//LowerPanel part
	boolean L_ready;
	int L_requiredNumMin;
	int L_requiredNumMax;
	boolean L_requireFromEquip;
	boolean L_requireFromHand;
	boolean L_classRequired;
	ArrayList<String> L_classRequiredString;
	boolean L_colorRequired;
	ArrayList<Integer> L_colorRequiredInt;
	boolean L_cardRequired;
	ArrayList<String> L_cardRequiredString;
	//BattleField part
	int BF_requiredNumMin;
	int BF_requiredNumMax;
	int BF_requireDistance;
	boolean BF_myselfClickable;

	boolean BF_requireEmpty;
	boolean BF_ifrequireSex;
	boolean BF_requireSex;
	boolean BF_ifrequireWeapon;
	boolean BF_requireWeapon;
	boolean BF_ifrequireHandCard;
	boolean BF_ifrequireCard;
	boolean BF_ready = false;
	
	public String getName() {
		return name;
	}
	public String getDescription() {
		return description;
	}
	public int getManaCost(){
		return manaCost;
	}
	
	public abstract void skillProcessInit();
	
	public abstract void skillProcessEnd();
}
